<template>
  <div class="app-container">
    <el-button type="primary" icon="Plus" @click="exit">添加退料</el-button>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="warehouseInNo" label="退料编号" align="center" />
      <el-table-column prop="productionNo" label="生产单号" align="center" />
      <el-table-column prop="workOrderName" label="生产计划名称" align="center" />
    </el-table>
  </div>
</template>

<script setup>

import { list } from '@/api/production/exit'
import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

let tableData = ref()

function getList() {
  list().then(response => {
    tableData.value = response.rows
  })
}

function exit() {
  router.push("/production/exitInfo")
}

onMounted(() => {
  getList()
})

</script>

<style scoped></style>